package org.example.strategy;

import java.util.ArrayList;

public class WSStrategy implements EditorStrategy {
    private ArrayList<String> loadedFileName;
    private String currentFileName;

    public WSStrategy(ArrayList<String> loadedFileName,String currentFileName){
        this.loadedFileName = loadedFileName;
        this.currentFileName = currentFileName;
    }
    @Override
    public void performAction() {
        if (loadedFileName.isEmpty()) System.out.println("No file is loaded!");
        int i =  1;
        for (String name:loadedFileName){
            if (name.equals(currentFileName)) System.out.println(i + "." + currentFileName + "<");
            else System.out.println(i + "." +name);
            i+=1;
        }
    }
}
